-- URL сайта
UPDATE wp_options SET option_value = replace(option_value, 'http://localhost/somesite', 'http://somesite') WHERE option_name = 'home' OR option_name = 'siteurl';

-- URL поста
UPDATE wp_posts
SET guid = REPLACE(guid, 'http://localhost/somesite','http://somesite');

-- URL в контенте
UPDATE wp_posts
SET post_content = REPLACE(post_content, 'http://localhost/somesite', 'http://somesite');